<script>on mouseUpask file "Log to what file?"if it ≠ "" thenglobal gFileNameput it into gFileNameopen file gFilenameend ifUpdateBtnsend mouseUp</script>
</part>
<part>
<id>3</id>
<type>button</type>
<visible> <false /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>186</left>
<top>257</top>
<right>306</right>
<bottom>294</bottom>
</rect>
<style>shadow</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>Close File</name>
<script>on mouseUpset cursor to 4global gFileNameclose file gFileNameput gFileName into thePathput empty into gFileNameUpdateBtnsanswer "The file was created:"&return &return &thePathend mouseUp</script>
</part>
<name></name>
<script>on appleEventglobal gFileNameif gFileName is empty thenbeepanswer "No output file has been opened!"&return&return&¬"Use the “Log to File” button."elserequest appleevent data of keyword "info"put number of lines in it into Xwrite line 1 to x-3 of it to file gFileNameend ifend appleEventon UpdateBtnsglobal gFileNameset the visible of cd btn "log to file" to (gFileName="")set the visible of cd btn "close file" to (gFileName≠"")end UpdateBtnson opencardUpdateBtnsend opencard</script>